package br.edu.fasete.javaroad.gui.util;

import java.awt.CardLayout;
import java.awt.Color;
import java.awt.Font;

import javax.swing.BorderFactory;
import javax.swing.JComponent;
import javax.swing.border.BevelBorder;
import javax.swing.border.TitledBorder;

public class TitledPanel extends JComponent {
	private static final long serialVersionUID = 1L;

	public TitledPanel (String title, JComponent content) {
		super();
		this.setLayout(new CardLayout());
		this.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createTitledBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED), title, TitledBorder.LEFT, TitledBorder.DEFAULT_POSITION, new Font("DokChampa", Font.BOLD, 12), new Color(51, 51, 51)), BorderFactory.createBevelBorder(BevelBorder.LOWERED)));
		this.add(content, title);
		
	}
	
}
